<?php
namespace common\service;


use common\models\Group;

class GroupService extends BaseService
{
    /**
     * 判断该团是否成立
     * @param string $group_id
     */
    public static function chectGroupStatus($group_id){
        $current_group = Group::findOne(['id' => $group_id]);
        $surplus = $current_group['group_num'] - $current_group['current_group_num'];
        if($surplus === 0){
            return true; //团满了
        }
        return false;
    }

}